package com.bree.erp.jsf.view;

import java.io.Serializable;

import javax.annotation.PostConstruct;
import javax.ejb.EJB;

import org.apache.log4j.Logger;
import org.primefaces.model.LazyDataModel;

import com.bree.erp.entity.BalanceId;
import com.bree.erp.entity.ReturnsBalance;
import com.bree.erp.jsf.datatable.LazyBreeDataModel;
import com.bree.erp.service.ReturnsBalanceService;

public class AbstractBalanceLazyView  implements Serializable {
	
	private static final long serialVersionUID = 1L;
	
	private static Logger LOG = Logger.getLogger(AbstractBalanceLazyView.class);

	@EJB
	private ReturnsBalanceService balanceService;

	private LazyDataModel<ReturnsBalance> lazyModel;

    @PostConstruct
    public void init() {
    	lazyModel = new LazyBreeDataModel<ReturnsBalance, ReturnsBalanceService, BalanceId>(balanceService, new BalanceId());
    }

	/**
	 * @return the lazyModel
	 */
	public LazyDataModel<ReturnsBalance> getLazyModel() {
		return lazyModel;
	}

	/**
	 * @param lazyModel the lazyModel to set
	 */
	public void setLazyModel(LazyDataModel<ReturnsBalance> lazyModel) {
		this.lazyModel = lazyModel;
	}
}
